function includes<T>(array: T[], value: T): boolean {
  if (!Array.isArray(array)) {
    throw new TypeError('First argument must be an array.');
  }

  for (let i = 0; i < array.length; i++) {
    if (array[i] === value) {
      return true;
    }
  }

  return false;
}

module.exports = {
  includes: includes
}